<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles" prefix="tiles"%>

<h:panelGrid columns="1" width="100%">
		<rich:dataTable id="dataPackagePeakRates" var="packagePeakRates" value="#{adminPackageBean.packageSuperPeakRatesList}" rows="20" width="99%">
			<rich:column style="text-align:center;width:5%;" >
				<f:facet name="header">
					<h:selectBooleanCheckbox id="chkAll" onclick="checkAll(this.form,this)" ></h:selectBooleanCheckbox>
				</f:facet>
				<h:selectBooleanCheckbox id="chk" value="#{packagePeakRates.markAsSelect}"></h:selectBooleanCheckbox>
			</rich:column>
			<rich:column style="text-align:center;width:30%;">
				<f:facet name="header">
					<h:outputText value="#{messages['package.point.column']}"></h:outputText>
				</f:facet>
				<h:commandLink action="#{adminPackageBean.navUpdatePackageSuperPeakAction}" actionListener="#{adminPackageBean.navUpdatePackageSuperPeakActionEvent}">
					<h:outputText value="#{packagePeakRates.point}">
						<f:convertNumber pattern="0.00"/>
					</h:outputText>
				</h:commandLink>
				<f:param id="packagePeakRatesId" value="#{packagePeakRates.packagePeakRatesId}" />
			</rich:column>
			<rich:column style="text-align:center;width:30%;">
				<f:facet name="header">
					<h:outputText value="#{messages['package.price.column']}">
					</h:outputText>
				</f:facet>
				<h:commandLink action="#{adminPackageBean.navUpdatePackageSuperPeakAction}" actionListener="#{adminPackageBean.navUpdatePackageSuperPeakActionEvent}">
					<h:outputText value="#{packagePeakRates.price}">
						<f:convertNumber pattern="#,###,###,##0.00"/>
					</h:outputText>
				</h:commandLink>
			</rich:column>
			<rich:column style="text-align:center;width:10%;" rendered="false">
				<f:facet name="header">
					<h:outputText value="#{messages['effective.date']}"></h:outputText>
				</f:facet>
				<h:outputText value="#{packagePeakRates.effectiveDate}">
					<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
				</h:outputText>
			</rich:column>
			<rich:column style="text-align:center;width:10%;" rendered="false">
				<f:facet name="header">
					<h:outputText value="#{messages['expiry.date']}"></h:outputText>
				</f:facet>
				<h:outputText value="#{packagePeakRates.expiryDate}">
					<f:convertDateTime pattern="dd/MM/yyyy" timeZone="Asia/Kuala_Lumpur"/>
				</h:outputText>
			</rich:column>
		</rich:dataTable>
		
		<rich:datascroller align="left"  for="dataPackagePeakRates" maxPages="20" />
		
		<t:panelGroup>
		   <t:panelGrid columns="2">
		   		<h:commandButton value="#{messages['add.package.peak.button']}" styleClass="button" action="#{adminPackageBean.navAddPackageSuperPeakAction}" actionListener="#{adminPackageBean.navAddPackageSuperPeakActionEvent}"></h:commandButton>
			    <h:commandButton value="#{messages['remove.package.peak.button']}" styleClass="button" action="#{adminPackageBean.deletePackageSuperPeakAction}" actionListener="#{adminPackageBean.deletePackageSuperPeakActionEvent}" onclick="#{messages['delete.msg.alert']}" ></h:commandButton>
		   </t:panelGrid>
		</t:panelGroup>
</h:panelGrid>